home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2001 March / macformat-101.iso / mac / Demos / SolidThinking 4 / Help / ehlpdht2.js < prev    next >
Encoding:
JavaScript  |  2000-09-06  |  33.5 KB  |  1,193 lines  |  [TEXT/dosa]

  1. /// Section Begin  - Popup and Related Topic (JavaScript 1.0)
  2. // eHelpÆ Corporation Dynamic HTML JavaScript 
  3. // Copyright© 1998-2000 eHelpÆ Corporation.All rights reserved.
  4. // Version=4.42
  5.  
  6. // Warning:Do not modify this file.It is generated by RoboHELPÆ and changes will be overwritten.
  7.  
  8.  
  9.  
  10. //Begin to support previous popup functions
  11. //////////////////////////////////////////////////////////////////////////////////////////////
  12. //
  13. //    Begin DHTML Popup Functions
  14. //
  15. //////////////////////////////////////////////////////////////////////////////////////////////
  16. //variables used to isolate the browser type
  17. var gBsDoc            = null;            
  18. var gBsSty            = null;
  19. var gBsHtm            = null;
  20. var gBsStyVisShow    = null;
  21. var gBsStyVisHide    = null;
  22. var gBsClientWidth    = 640;
  23. var gBsClientHeight = 480;
  24. var gBsBrowser        = null;
  25.  
  26. // here is the varible for judge popup windows size. these parameter is for IE5.0, it may need adjust for others.
  27. var gBRateH_W        = 0.618; // 1.618 Golden cut.
  28. var gBMaxXOfParent    = 0.8; 
  29. var gBMaxYOfParent    = 0.8;
  30. var gBscrollHeight   = 16;
  31. var gBscrollWidth   =  16;
  32. var gBpermitXDelta    = 3;
  33. var gBpermitYDelta    = 3;
  34.  
  35.  
  36. var g_bIsPopupInit = false;
  37. function _BSSCCreatePopupDivOnLoad()
  38. {
  39.     if(!g_bIsPopupInit)
  40.     {
  41.         BsPopup_CreateDiv(0);
  42.         g_bIsPopupInit = true;
  43.     }
  44. }
  45.  
  46. function _BSSCCreatePopupDivOnWrite()
  47. {
  48.     if(!g_bIsPopupInit)
  49.     {
  50.         BsPopup_CreateDiv(1);
  51.         g_bIsPopupInit = true;
  52.     }
  53. }
  54.  
  55. function _BSSCCreatePopupDivOnWriteForKodav()
  56. {
  57.     if(!g_bIsPopupInit)
  58.     {
  59.         if ((gbBsIE4) && (!gbBsIE5))
  60.         {
  61.             BsPopup_CreateDiv(2);
  62.             g_bIsPopupInit = true;
  63.         }
  64.     }
  65. }
  66.  
  67.  
  68. //the browser information itself
  69. function _BSPSBrowserItself()
  70. {
  71.     var agent  = navigator.userAgent.toLowerCase();
  72.     this.major = parseInt(navigator.appVersion);
  73.     this.minor = parseFloat(navigator.appVersion);
  74.     this.ns    = ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1)));
  75.     this.ns2   = ((this.ns) && (this.major == 2));
  76.     this.ns3   = ((this.ns) && (this.major == 3));
  77.     this.ns4   = ((this.ns) && (this.major >= 4));
  78.     this.ie       = (agent.indexOf("msie") != -1);
  79.     this.ie3   = ((this.ie) && (this.major == 2));
  80.     this.ie4   = ((this.ie) && (this.major >= 4));
  81.     this.op3   = (agent.indexOf("opera") != -1);
  82.  
  83.     if (this.ns4)
  84.     {
  85.         gBsDoc        = "document";
  86.         gBsSty        = "";
  87.         gBsHtm        = ".document";
  88.         gBsStyVisShow    = "show";
  89.         gBsStyVisHide    = "hide";
  90.  
  91.     }
  92.     else if (this.ie4)
  93.     {
  94.         gBsDoc         = "document.all";
  95.         gBsSty         = ".style";
  96.         gBsHtm         = "";
  97.         gBsStyVisShow    = "visible";
  98.         gBsStyVisHide    = "hidden";
  99.     }
  100. }
  101.  
  102. //Here is the browser type 
  103. function _BSPSGetBrowserInfo()
  104. {
  105.     gBsBrowser    = new _BSPSBrowserItself();
  106. }
  107.  
  108. //Get client size info
  109. function _BSPSGetClientSize()
  110. {
  111.     if (gBsBrowser.ns4)
  112.     {
  113.         gBsClientWidth    = innerWidth;
  114.         gBsClientHeight = innerHeight;
  115.  
  116.     }
  117.     else if (gBsBrowser.ie4)
  118.     {
  119.         gBsClientWidth    = document.body.clientWidth;
  120.         gBsClientHeight = document.body.clientHeight;
  121.     }
  122. }
  123.  
  124.  
  125. var gstrPopupID = 'BSSCPopup';
  126. var gstrPopupShadowID = 'BSSCPopupShadow';
  127. var gstrPopupTopicID = 'BSSCPopupTopic';
  128. var gstrPopupIFrameID = 'BSSCPopupIFrame';
  129. var gstrPopupIFrameName = 'BSSCPopupIFrameName';
  130.  
  131. var gstrPopupSecondWindowName = 'BSSCPopup';
  132.  
  133. var    gPopupDiv = null;
  134. var gPopupDivStyle = null;
  135. var    gPopupShadow = null;
  136. var    gPopupTopic = null;
  137. var gPopupIFrame = null;
  138. var gPopupIFrameStyle = null;
  139. var gPopupWindow = null;
  140. var gnPopupClickX = 0;
  141. var gnPopupClickY = 0;
  142.  
  143. var gnPopupScreenClickX = 0;
  144. var gnPopupScreenClickY = 0;
  145.  
  146. var gbPopupTimeoutExpired = false;
  147.  
  148. var gbScriptName = "EHELP_DHTM";
  149. var gbPathofJS = "";
  150.  
  151.  
  152. if (gbBsIE4) {
  153.     var aScripts = document.scripts;
  154.     var aScript = null;
  155.     var i = 0;
  156.     for (i = 0; i < aScripts.length ; i ++ )
  157.     {
  158.         if (aScripts[i].name == gbScriptName) {
  159.             aScript = aScripts[i];
  160.             break;
  161.         }
  162.         
  163.     }
  164.  
  165.     if (aScript != null) {
  166.         var nPathPos = 0;
  167.         var strCurrentSrc = "";
  168.         strCurrentSrc = aScript.src;
  169.         var nPathPos1 = strCurrentSrc.lastIndexOf("\\");
  170.         var nPathPos2 = strCurrentSrc.lastIndexOf("/");
  171.         if (nPathPos1 > nPathPos2)
  172.             nPathPos = nPathPos1 + 1;
  173.         else
  174.             nPathPos = nPathPos2 + 1;
  175.  
  176.         gbPathofJS = strCurrentSrc.substring(0, nPathPos);
  177.     }
  178. }
  179.  
  180. // Replace point - Used by SingleSource 
  181. // var gbBlankPageForIFrame = gbPathofJS + "_blank.htm";
  182.  var gbBlankPageForIFrame = gbPathofJS + "_blank.htm";
  183.  
  184. function DHTMLPopupSupport()
  185. {
  186.     if ((gbBsIE4) && (!gbBsMac)) {
  187.         return true;
  188.     }
  189.     return false;
  190. }
  191.  
  192.  
  193.  
  194. function BSSCPopup_IsPopup()
  195. {
  196.     if (DHTMLPopupSupport() && (this.name == gstrPopupIFrameName)) {
  197.         return true;
  198.     } else if ((gbBsNS4 || gbBsIE4) && (this.name == gstrPopupID)) {
  199.         return true;
  200.     } else {
  201.         return false;
  202.     }
  203. }
  204.  
  205.  
  206. // If there is a hyperlink in a popup window, display the hyperlink in
  207. // the original window.
  208. if (BSSCPopup_IsPopup()) {
  209.     document.write("<base target=\"_parent\">");
  210. }
  211.  
  212. // Local functions.
  213. function BsPopup_CreateDiv(mode)
  214. {
  215.     if( gPopupDiv != null || (!DHTMLPopupSupport()) )
  216.         return;
  217.     var strPopupDiv = "";
  218.     if (gbBsIE5 || gbBsIE55) {
  219.         strPopupDiv = "<DIV ID='" + gstrPopupID + "' STYLE='position:absolute; width:0; height:0; top:-100; left:0; z-index:600; visibility:hidden;'>";
  220.         strPopupDiv += "<DIV ID='" + gstrPopupShadowID + "' STYLE=\"position:absolute;top:0; left:0;  width:0; height:0; background-color:#C0C0C0;\"></DIV>";
  221.         strPopupDiv += "<DIV ID='" + gstrPopupTopicID + "' STYLE=\"position:absolute;top:0; left:0;  width:0; height:0; background-color:#FFFFFF;border:1px #000000 outset;\">";
  222.         strPopupDiv += "<IFRAME ID='" + gstrPopupIFrameID + "' name='" + gstrPopupIFrameName + "' src = '" + gbBlankPageForIFrame + "' frameborder=0 scrolling=auto></IFRAME>";
  223.         strPopupDiv += "</DIV></DIV>"; 
  224.     }
  225.     else {
  226.         strPopupDiv = "<DIV ID='" + gstrPopupID + "' STYLE='position:absolute; top:-100; left:0; z-index:600; visibility:hidden;'>";
  227.         strPopupDiv += "<DIV ID='" + gstrPopupShadowID + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#C0C0C0;\"></DIV>";
  228.         strPopupDiv += "<DIV ID='" + gstrPopupTopicID + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#FFFFFF;border:1px #000000 outset;\">";
  229.         strPopupDiv += "<IFRAME ID='" + gstrPopupIFrameID + "' name='" + gstrPopupIFrameName + "' src = '" + gbBlankPageForIFrame + "' frameborder=0 scrolling=auto></IFRAME>";
  230.         strPopupDiv += "</DIV></DIV>"; 
  231.     }
  232.         
  233.  
  234.     if (mode == 0)
  235.     {    
  236.         var objBody = document.all.tags("BODY")[0];
  237.         if( typeof(objBody) != "object" )
  238.             return;
  239.  
  240.         objBody.insertAdjacentHTML("beforeEnd", strPopupDiv);
  241.     }
  242.     else if (mode == 1)
  243.     {
  244.         document.write(strPopupDiv);
  245.     }
  246.     else if (mode == 2)
  247.     {
  248.         document.write(strPopupDiv);
  249.     }
  250. }
  251.  
  252.  
  253. function BSSCPopup_Timeout()
  254. {
  255.     if ((gPopupIFrame.document.readyState == "complete") &&
  256.         (gPopupIFrame.document.body != null) && 
  257.         (gPopupIFrame.location.href.indexOf("_blank.htm") == -1)) {
  258.         window.gPopupDivStyle.visibility = gBsStyVisShow;
  259.         BSSCPopup_TimeoutReal();
  260.     } else {
  261.         setTimeout("BSSCPopup_Timeout()", 100);
  262.     }
  263. }
  264.  
  265. function BSSCPopup_TimeoutReal()
  266. {
  267.     window.gbPopupTimeoutExpired = true;
  268.  
  269.     if (gPopupIFrame.document) {
  270.         BSSCPopup_ChangeTargettoParent(gPopupIFrame.document);
  271.         gPopupIFrame.document.body.onclick = BSSCPopupClicked;
  272.     }
  273.     gbOrignalOnMouseDown = document.onmousedown;
  274.     document.onmousedown = BSSCPopupParentClicked;
  275. }
  276.  
  277. function BSSCPopup_ChangeTargettoParent(tagsObject)
  278. {
  279.     var collA = tagsObject.all.tags("A");
  280.     var j = 0;
  281.     if (collA != null) {
  282.         for (j = 0; j < collA.length; j ++ )
  283.         {
  284.             collA[j].target = "_parent";
  285.         }
  286.  
  287.     }
  288. }
  289.  
  290. function BSPSPopupTopicWinHelp(strURL)
  291. {
  292.     _BSSCPopup(strURL);
  293.     return;
  294. }
  295.  
  296. function _BSSCPopup(strURL)
  297. {
  298.     if (DHTMLPopupSupport()) {
  299.         // If we are already in a popup, replace the contents
  300.         if (BSSCPopup_IsPopup()) {
  301.  
  302.             location.href = strURL;
  303.             parent.window.gbPopupTimeoutExpired = false;
  304.             if (gbBsMac) {
  305.                 setTimeout("BSSCPopup_AfterLoad('" + strURL + "')", 400);
  306.             } else {
  307.                 setTimeout("BSSCPopup_AfterLoad('" + strURL + "')", 100);
  308.             }
  309.             
  310.         } else {
  311.  
  312.             var tempColl = document.all.tags("DIV");
  313.             for (var iDiv = 0; iDiv < tempColl.length; iDiv++)
  314.             {
  315.                 if (tempColl(iDiv).id == gstrPopupID)
  316.                     gPopupDiv = tempColl(iDiv);
  317.                 if (tempColl(iDiv).id == gstrPopupShadowID)
  318.                     gPopupShadow = tempColl(iDiv);
  319.                 if (tempColl(iDiv).id == gstrPopupTopicID)
  320.                     gPopupTopic = tempColl(iDiv);
  321.             }
  322.         
  323.             gPopupIFrame = eval("gPopupDiv.document.frames['" + gstrPopupIFrameName + "']");
  324.             gPopupDivStyle = eval("gPopupDiv" + gBsSty);
  325.             gPopupIFrameStyle = eval(gBsDoc + "['" + gstrPopupIFrameName + "']" + gBsSty);
  326.  
  327.             // Load the requested URL into the IFRAME
  328.             gPopupIFrame.location.href = strURL;
  329.             window.gbPopupTimeoutExpired = false;
  330.             if (gbBsMac) {
  331.                 setTimeout("BSSCPopup_AfterLoad('" + strURL + "')", 400);
  332.             } else {
  333.                 setTimeout("BSSCPopup_AfterLoad('" + strURL + "')", 100);
  334.             }
  335.         }
  336.  
  337.     } else {
  338.         _BSSCPopup2(strURL);
  339.     }
  340.     return;
  341. }
  342.  
  343.  
  344. function _BSSCPopup2(strURL)
  345. {
  346.     if (window.name == gstrPopupSecondWindowName) {
  347.         window.location = strURL;
  348.     } else {
  349.  
  350.         BSSCHidePopupWindow();
  351.         var nX = 0;
  352.         var nY = 0;
  353.         var nHeight = 300;
  354.         var nWidth = 400;
  355.         _BSPSGetClientSize();
  356.         if (gBsBrowser.ns4) {
  357.             nX = window.screenX + (window.outerWidth - window.innerWidth) + window.gnPopupClickX;
  358.             nY = window.screenY + (window.outerHeight - window.innerHeight) + window.gnPopupClickY;
  359.             if (nY + nHeight + 40 > screen.availHeight) {
  360.                 nY = screen.availHeight - nHeight - 40;
  361.             }
  362.             if (nX + nWidth + 40 > screen.availWidth) {
  363.                 nX = screen.availWidth - nWidth - 40;
  364.             }
  365.         } else {
  366.             nX = window.gnPopupScreenClickX;
  367.             nY = window.gnPopupScreenClickY;
  368.         }
  369.  
  370.         // Launch a separate window
  371.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes";
  372.         if (gBsBrowser.ns) {
  373.             strParam += ",OuterHeight=" + nHeight + ",OuterWidth=" + nWidth;
  374.             strParam += ",screenX=" + nX + ",screenY=" + nY;
  375.             strParam += ",dependent=yes";
  376.         }
  377.         else {
  378.             strParam += ",height=" + nHeight + ",width=" + nWidth;
  379.             strParam += ",left=" + nX + ",top=" + nY;
  380.         }
  381.         window.gPopupWindow = window.open(strURL, gstrPopupSecondWindowName, strParam);
  382.         if (gBsBrowser.ns4) {
  383.             window.gPopupWindow.captureEvents(Event.CLICK | Event.BLUE);
  384.             window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  385.             window.gPopupWindow.onblur = NonIEPopup_HandleBlur;
  386.         }
  387.         else if (gBsBrowser.ie4)
  388.         {
  389.             window.gPopupWindow.focus();
  390.         }
  391.     }
  392.     return;
  393. }
  394.  
  395. function NonIEPopup_HandleBlur(e)
  396. {
  397.     window.gPopupWindow.focus();
  398. }
  399.  
  400. function NonIEPopup_HandleClick(e)
  401. {
  402.     // Because navigator will give the event to the handler before the hyperlink, let's
  403.     // first route the event to see if we are clicking on a Popup menu in a popup.
  404.     document.routeEvent(e);
  405.  
  406.     // If a popup menu is active then don't do anything with the click
  407.     if (window.gPopupWindow.gbInPopupMenu) {
  408.         window.gPopupWindow.captureEvents(Event.CLICK);
  409.         window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  410.         return false;
  411.     }
  412.  
  413.     // Close the popup window
  414.     if (e.target.href != null) {
  415.         window.location.href = e.target.href;
  416.         if (e.target.href.indexOf("BSSCPopup") == -1) {
  417.             this.close();
  418.         }
  419.     } else {
  420.         this.close();
  421.     }
  422.     return false;
  423. }
  424.  
  425. function BSSCPopup_AfterLoad(strURL)
  426. {    
  427.     if (typeof(window.gPopupIFrame.document) == "unknown") {
  428.         _BSSCPopup2(strURL);
  429.         return;
  430.     }
  431.     if ((window.gPopupIFrame.document.readyState == "complete") &&
  432.         (window.gPopupIFrame.document.body != null) && 
  433.         (window.gPopupIFrame.location.href.indexOf("_blank.htm") == -1)) {
  434.         BSSCPopup_ResizeAfterLoad(strURL);
  435.     } else {
  436.         setTimeout("BSSCPopup_AfterLoad('" + strURL + "')", 200);
  437.     }
  438. }
  439.  
  440.  
  441. function BSSCPopup_ResizeAfterLoad(strURL)
  442. {
  443.     window.gPopupDivStyle.visibility = gBsStyVisHide;
  444.  
  445.     // Determine the width and height for the window
  446.     //var size = new BSSCSize(0, 0);
  447.     //BSSCGetContentSize(window.gPopupIFrame, size);
  448.     //var nWidth = size.x;
  449.     //var nHeight = size.y;
  450.  
  451.     _BSPSGetClientSize();
  452.     
  453.     var size = new BSSCSize(0, 0);
  454.  
  455.     BSSCGetContentSize(window.gPopupIFrame, size);
  456.  
  457.     // Determine the width and height for the window
  458.     var nWidth = size.x;
  459.     var nHeight = size.y;
  460.         
  461.     window.gPopupDivStyle.width = nWidth;
  462.     window.gPopupDivStyle.height = nHeight;
  463.  
  464.     // Determine the position of the window
  465.     var nClickX = window.gnPopupClickX;
  466.     var nClickY = window.gnPopupClickY;
  467.     var nTop = 0;
  468.     var nLeft = 0;
  469.  
  470.     if (nClickY + nHeight + 20 < gBsClientHeight + document.body.scrollTop) {
  471.         nTop = nClickY + 10;
  472.     } else {
  473.         nTop = (document.body.scrollTop + gBsClientHeight) - nHeight - 20;
  474.     }
  475.     if (nClickX + nWidth < gBsClientWidth + document.body.scrollLeft) {
  476.         nLeft = nClickX;
  477.     } else {
  478.         nLeft = (document.body.scrollLeft + gBsClientWidth) - nWidth - 8;
  479.     }
  480.     
  481.     if (nTop < document.body.scrollTop ) nTop  = document.body.scrollTop + 1;
  482.     if (nLeft< document.body.scrollLeft) nLeft = document.body.scrollLeft + 1;
  483.  
  484.  
  485.     window.gPopupDivStyle.left = nLeft;
  486.     window.gPopupDivStyle.top = nTop;
  487.  
  488.     // Set the location of the background blocks
  489.     window.gPopupShadow.style.left = 6;
  490.     window.gPopupShadow.style.top = 6;
  491.     if (gbBsIE55)
  492.     {
  493.         window.gPopupShadow.style.left = 4;
  494.         window.gPopupShadow.style.top = 4;
  495.     }
  496.     window.gPopupShadow.style.width = nWidth;
  497.     window.gPopupShadow.style.height = nHeight;
  498.     window.gPopupTopic.style.width = nWidth;
  499.     window.gPopupTopic.style.height = nHeight;
  500.     if (gbBsIE55)
  501.     {
  502.         window.gPopupShadow.style.width = nWidth + 2;
  503.         window.gPopupShadow.style.height = nHeight + 2;
  504.         window.gPopupTopic.style.width = nWidth + 2;
  505.         window.gPopupTopic.style.height = nHeight + 2;
  506.     }
  507.  
  508.  
  509.     if (gbBsMac) {
  510.         // Total hack on the iMac to get the IFrame to position properly
  511.         window.gPopupIFrameStyle.pixelLeft = 100;
  512.         window.gPopupIFrameStyle.pixelLeft = 0;
  513.         // Explicitly call BSSCOnLoad because the Mac doesn't seem to do it
  514.         window.gPopupIFrame.window.BSSCOnLoad();
  515.     }
  516.     //var nOriWidth = window.gPopupIFrameStyle.width
  517.  
  518.     window.gPopupIFrameStyle.width = nWidth;
  519.     window.gPopupIFrameStyle.height = nHeight;
  520.     if (gbBsIE55)
  521.     {
  522.         window.gPopupIFrameStyle.top = 0;
  523.         window.gPopupIFrameStyle.left = 0;
  524.     }
  525.  
  526.     gPopupIFrame.location.href = strURL;  // reload again, this will fix the bookmark misunderstand in IE5.
  527.     
  528.     setTimeout("BSSCPopup_Timeout();", 100);
  529.     
  530.     return false;
  531. }
  532.  
  533. function    BSSCSize(x, y)
  534. {
  535.     this.x = x;
  536.     this.y = y;
  537. }
  538.  
  539. function BSSCGetContentSize(thisWindow, size)
  540. {
  541.     if (!((gBsBrowser.ie4) || (gBsBrowser.ns4)))
  542.         return;
  543.  
  544.     if (gbBsMac) {
  545.         size.x = 300;
  546.         size.y = 300;
  547.         return;
  548.     }
  549.  
  550.     // Resize the width until it is wide enough to handle the content
  551.     // The trick is to start wide and determine when the scrollHeight changes
  552.     // because then we know a scrollbar is necessary. We can then go back
  553.     // to the next widest size (for no scrollbar)
  554.  
  555.     var ClientRate = gBsClientHeight / gBsClientWidth;
  556.  
  557.     var GoldenSize = new BSSCSize(0,0);
  558.     GoldenSize.x = gBsClientWidth * gBMaxXOfParent;
  559.     GoldenSize.y = gBsClientHeight *gBMaxYOfParent ;
  560.  
  561.     if (ClientRate > gBRateH_W) {
  562.         GoldenSize.y = GoldenSize.x * gBRateH_W;
  563.     }
  564.     else {
  565.         GoldenSize.x = GoldenSize.y / gBRateH_W;
  566.     }
  567.  
  568.     // Try to using parent specified max x.
  569.     var x = 0;
  570.     var maxgoldx = GoldenSize.x;
  571.     var maxx = gBsClientWidth * gBMaxXOfParent;
  572.     
  573.     // This double resize causes the document to re-render (and we need it to)
  574.     thisWindow.moveTo(10000,10000); // this is used to fix the flash on IE4.
  575.     thisWindow.resizeTo(1, 1);
  576.     thisWindow.resizeTo(1, 1);
  577.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  578.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  579.         
  580.     var miny = thisWindow.document.body.scrollHeight + gBscrollHeight;
  581.     
  582.     if (miny > GoldenSize.y) // the popup does not fix in the parent wanted golden area. so try to expand itself as large as it can
  583.     {
  584.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  585.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  586.         
  587.         miny =     thisWindow.document.body.scrollHeight + gBscrollHeight;
  588.         maxy = gBsClientHeight * gBMaxYOfParent;
  589.         
  590.         if (miny > maxy) { // the popup must have a scroll, OK let it be.
  591.             miny = maxy;
  592.             size.x = maxx;
  593.             size.y = maxy;
  594.         }
  595.         else { // popup still can fit in the parent area by someway. now we choose the same h/w rate as parent.
  596.             size.y = miny;
  597.             
  598.             //  downsize from maxx , now I try to using binary divide.
  599.             x = maxx;
  600.             deltax = -maxx/2;
  601.             //j = 0;
  602.             while (true) {
  603.                 x = x + deltax;
  604.                 thisWindow.resizeTo(x, miny);
  605.                 thisWindow.resizeTo(x, miny);
  606.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * ClientRate;
  607.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  608.                     deltax = Math.abs(deltax) /2;
  609.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  610.                     deltax = -Math.abs(deltax) /2;
  611.                 else 
  612.                     // the y is close enough to wanted.
  613.                     break;
  614.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  615.                     break;
  616.             }
  617.             size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth;
  618.             size.y = thisWindow.document.body.scrollHeight;// + gBscrollHeight;    
  619.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  620.             
  621.         // Handle absurd cases just in case IE flakes
  622.     //        if (size.y < 100) {
  623.     //            size.y = 100;
  624.     //        }
  625.         }
  626.     }
  627.     else {
  628.         //  downsize from maxgoldx , now I try to using binary divide.
  629.         x = maxgoldx;
  630.         deltax = -maxgoldx/2;
  631.         //i = 0;
  632.         while (true) {
  633.             x = x + deltax;
  634.             thisWindow.resizeTo(x, miny);
  635.             thisWindow.resizeTo(x, miny);
  636.             diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * gBRateH_W;
  637.             if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  638.                 deltax = Math.abs(deltax) /2;
  639.             else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  640.                 deltax = -Math.abs(deltax) /2;
  641.             else 
  642.                 // the y is close enough to wanted.
  643.                 break;
  644.             if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  645.                 break;
  646.             //i ++;
  647.                 
  648.         }
  649.         size.x = thisWindow.document.body.scrollWidth ;//+ gBscrollWidth;
  650.         size.y = thisWindow.document.body.scrollHeight ;//+ gBscrollHeight;    
  651.         thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  652.     }
  653.  
  654.     size.x = size.x + 16;    //reserve a width for scrollbar
  655.  
  656.     thisWindow.resizeTo(size.x, size.y);
  657.     thisWindow.resizeTo(size.x, size.y);
  658.     return;
  659. }
  660.  
  661.  
  662.  
  663. function BSSCPopupParentClicked()
  664. {
  665.     BSSCPopupClicked();
  666.     return;
  667. }
  668.  
  669.  
  670. function BSSCPopupClicked()
  671. {
  672.     if (!window.gbPopupTimeoutExpired) {
  673.         return false;
  674.     }
  675.  
  676.     if (gPopupIFrame.window.gbInPopupMenu) {
  677.         return false;
  678.     }
  679.  
  680.     // Give the user a message about javascript calls through objects.
  681.     if ((gPopupIFrame.window.event != null) &&
  682.         (gPopupIFrame.window.event.srcElement != null) &&
  683.         (gPopupIFrame.window.event.srcElement.tagName == "A") &&
  684.         (gPopupIFrame.window.event.srcElement.href.indexOf("javascript:") == 0) &&
  685.         (gPopupIFrame.window.event.srcElement.href.indexOf(".") != -1)) {
  686.         gPopupIFrame.window.event.cancelBubble = true;
  687.         alert('Hyperlinks to objects do not work in popups.');
  688.         return false;
  689.     }
  690.  
  691.     if (gPopupIFrame.document) {
  692.         gPopupIFrame.document.body.onclick = null;
  693.     }
  694.  
  695.     document.onmousedown = gbOrignalOnMouseDown;
  696.  
  697.     // Simply hide the popup
  698.     gPopupDivStyle.visibility = gBsStyVisHide;
  699.     gPopupIFrame.location.href = gbBlankPageForIFrame;
  700.  
  701.     return true;
  702. }
  703.  
  704.  
  705. //trace the mouse over's position for hotspot
  706. function  BSPSPopupOnMouseOver(event)
  707. {
  708.     if (gBsBrowser.ie4) {
  709.         window.gnPopupClickX = event.clientX + document.body.scrollLeft;
  710.         window.gnPopupClickY = event.clientY + document.body.scrollTop;
  711.         window.gnPopupScreenClickX = event.screenX;
  712.         window.gnPopupScreenClickY = event.screenY;
  713.     } else if (gBsBrowser.ns4) {
  714.         window.gnPopupClickX = event.pageX;
  715.         window.gnPopupClickY = event.pageY;
  716.     }
  717. }
  718.  
  719. function BSSCHidePopupWindow()
  720. {
  721.     if (window.gPopupWindow != null) {
  722.         if (gBsBrowser.ns4) {
  723.             if ((typeof window.gPopupWindow != "undefined") && (!window.gPopupWindow.closed)) {
  724.                 window.gPopupWindow.close();
  725.                 window.gPopupWindow = null;
  726.             }
  727.         }
  728.     }
  729.  
  730.     return;
  731. }
  732.  
  733. // Add the PopupOnClick to the onclick array.
  734. if (typeof(BsscRegisterOnClick) != "undefined")
  735. {
  736.     BsscRegisterOnClick(BsPopupOnClick);
  737. }
  738. //End to support previous popup functions
  739.  
  740. //Begin to support previous relative topics
  741. //If webHelp needs Related Topics DHTMLcode, it's supposed to add it here
  742. var gbPopupMenuTimeoutExpired = false;
  743. var gbInPopupMenu = false;
  744. var gbPopupMenuTopicList = null;
  745.  
  746. //////////////////////////////////////////////////////////////////////////////////////////
  747. //
  748. // Popup Menu code
  749. //
  750. //////////////////////////////////////////////////////////////////////////////////////////
  751.  
  752. var g_bIsPopupMenuInit = false;
  753. function _WritePopupMenuLayer()
  754. {
  755.     if (!g_bIsPopupMenuInit)
  756.         {
  757.       if (gbBsNS4) {
  758. //Do not try to write ininle styles for NS!  NS can not handle it and will not stop downloading the html page...
  759.        document.write("<DIV CLASS='WebHelpPopupMenu' ID='PopupMenu'></DIV>");
  760.       } else{
  761.       document.write("<DIV ID='PopupMenu' STYLE='position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;'></DIV>");
  762.       if (gbBsIE4) {
  763.         document.write("<STYLE TYPE='text/css'>");
  764.         if (gbBsMac) {
  765.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:10pt; text-decoration:none;}");
  766.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:10pt; text-decoration:none;}");
  767.         } else {
  768.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:8pt; text-decoration:none;}");
  769.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:8pt; text-decoration:none;}");
  770.         }
  771.         document.write("</STYLE>");
  772.        }
  773.           }
  774.       g_bIsPopupMenuInit = true;
  775.     }
  776. }
  777.  
  778. //Define variable arguments as: strTitle, strUrl
  779. function PopupMenuTopicEntry() 
  780. {
  781.     this.strTitle = PopupMenuTopicEntry.arguments[0];
  782.     this.strURL = PopupMenuTopicEntry.arguments[1];
  783. }
  784.  
  785. // If the topic list is set, it is an array of TopicEntry objects (defined in WebHelp3.js)
  786. function PopupMenu_SetTopicList(aPopupTopicArray)
  787. {
  788.     gbPopupMenuTopicList = aPopupTopicArray;
  789. }
  790.  
  791. //Seek for the bsscright frame 
  792. function _SeekFrameByName( cRoot, strName )
  793. {
  794.     if( cRoot == null )    return null;
  795.     if( cRoot.frames == null )    return null;
  796.     if( cRoot.frames[strName] != null )    return cRoot.frames[strName];
  797.     for (var i=0; i<cRoot.frames.length; i++)
  798.     {
  799.         var cObj = _SeekFrameByName( cRoot.frames(i).document, strName );
  800.         if( cObj != null )        return cObj;
  801.     };
  802.     return null;
  803. }
  804. function _GetFrameByName( cRoot, strName )
  805. {
  806.     if( cRoot == null )    return null;
  807.     var cRet = _SeekFrameByName(cRoot, strName);
  808.     if( cRet != null )    return cRet;
  809.     return _GetFrameByName( cRoot.parent, strName );
  810. }
  811.  
  812. function _PopupMenu_Invoke(fn_arguments)
  813. {
  814.     if ((!gbBsIE4 && !gbBsNS4) || ((gbBsMac) && (gbBsIE4) && (window.event.srcElement.tagName == "AREA"))) {
  815.     
  816.         var argLen     = fn_arguments.length;
  817.  
  818.         // Create the window that the hyperlinks will go into
  819.         var nHeight = argLen * 15;
  820.         var nWidth = 400;
  821.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  822.         strParam += ",height=" + nHeight + ",width=200";
  823.         strParam += ",resizable";
  824.  
  825.         // Create a temporary window first to ensure the real popup comes up on top
  826.         var wndTemp = window.open("", "temp", strParam);
  827.  
  828.         // Create the real popup window
  829.         var wndPopupLinks = window.open("", "popuplinks", strParam);
  830.  
  831.         // Close the temporary
  832.         wndTemp.close();
  833.  
  834.         wndPopupLinks.document.open("text/html");
  835.         wndPopupLinks.document.write("<html><head></head>");
  836.         wndPopupLinks.document.write("<body onBlur=\'self.focus();\'>");
  837.         var strParaLine = "";
  838.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  839.             strParaLine = "";
  840.             strParaLine += "<a href=\"javascript:";
  841.             if (gbBsIE) {
  842.                 strParaLine += "onBlur=null; ";
  843.             }
  844.             strParaLine += "opener.location=\'";
  845.             strParaLine += fn_arguments[2 * i + 3];
  846.             strParaLine += "\';close();\"";
  847.             if (fn_arguments[1] != '') {
  848.                 strParaLine += " TARGET='" + fn_arguments[1] + "'";
  849.             }
  850.             strParaLine += ">";
  851.             strParaLine += fn_arguments[2 * i + 2];
  852.             strParaLine += "</a>";
  853.             strParaLine += "<br>";
  854.             wndPopupLinks.document.write(strParaLine);
  855.         }
  856.         wndPopupLinks.document.write("</body></html>");
  857.         wndPopupLinks.document.close();
  858.         window.gbInPopupMenu = true;
  859.         if (!gbBsIE) {
  860.             wndPopupLinks.focus();
  861.         }
  862.  
  863.         return false;
  864.     }
  865.  
  866.     // Make sure we have reasonable arguments
  867.     var argLen = fn_arguments.length;
  868.     if (argLen < 3) {
  869.         return false;
  870.     }
  871.  
  872.     // Check to see if we only have one target
  873.     var strTarget = "";
  874.     if (((argLen < 5) && ((isNaN(fn_arguments[2])) || (gbPopupMenuTopicList == null))) ||
  875.         ((argLen < 4) && ((!isNaN(fn_arguments[2])) && (gbPopupMenuTopicList != null)))) {
  876.  
  877.         // Get the place that we will be putting the topic into
  878.         var targetDoc = null;
  879.         if (fn_arguments[1] == '') {
  880.             targetDoc = window.document;
  881.         } else {
  882.             targetDoc = _GetFrameByName( parent, fn_arguments[1] );
  883.             if (targetDoc == null) {
  884.                 targetDoc  = window.document;
  885.             }
  886.             //if (gbBsIE4) {
  887.             //        targetDoc = eval("top.document.frames['" + fn_arguments[1] + "']");
  888.             //    } else if (gbBsNS4) {
  889.             //    targetDoc = eval("window.top." + fn_arguments[1] + ".document");
  890.             //}
  891.             strTarget = "TARGET='" + fn_arguments[1] + "'";
  892.         }
  893.         if (isNaN(fn_arguments[2]) ||  (gbPopupMenuTopicList == null)) {
  894.             targetDoc.location.href = fn_arguments[3];
  895.         } else {
  896.             targetDoc.location.href = gbPopupMenuTopicList[fn_arguments[2]].strURL;
  897.         }
  898.         return false;
  899.     }
  900.     
  901.     var strMenu = "";
  902.     if (gbBsNS4) {
  903.         strMenu = '<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=3 BGCOLOR="#c0c0c0">';
  904.     } else {
  905.         strMenu = '<TABLE STYLE="border:2px outset white;" CELLSPACING=0';
  906.         if (gbBsMac) {
  907.             strMenu += ' CELLPADDING=4';
  908.         } else {
  909.             strMenu += ' CELLPADDING=2';
  910.         }    
  911.         strMenu += ' BGCOLOR=#c0c0c0>';
  912.     }
  913.  
  914.     // Add each of the items
  915.     var i = 2;
  916.     while (i <= argLen - 1) {
  917.         strMenu += '<TR><TD><NOBR>'
  918.         // If the destination is a number then look it up in the topic list
  919.         if (isNaN(fn_arguments[i]) ||  (gbPopupMenuTopicList == null)) {
  920.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + fn_arguments[i + 1] + '"' + strTarget;
  921.         } else {
  922.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + gbPopupMenuTopicList[fn_arguments[i]].strURL + '"' + strTarget;
  923.         }
  924.         strMenu += ' onclick="PopupMenu_HandleClick(event);"';
  925.         strMenu += ' onmouseover="PopupMenu_Over(event);"';
  926.         strMenu += ' onmouseout="PopupMenu_Out(event);"';
  927.         strMenu += '>';
  928.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  929.             strMenu += '<SPAN CLASS="PopupNotOver">' + fn_arguments[i] + '</SPAN>';
  930.         } else {
  931.             strMenu += '<SPAN CLASS="PopupNotOver">' + gbPopupMenuTopicList[fn_arguments[i]].strTitle + '</SPAN>';
  932.         }
  933.         strMenu += '</A></DIV></NOBR></TD></TR>';
  934.  
  935.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  936.             i += 2;
  937.         } else {
  938.             i += 1;
  939.         }
  940.     }
  941.     strMenu += "</TABLE>";
  942.  
  943.     if (gbBsMac) {
  944.     // totally hack. because ie5 in mac need something. </TABLE> is one of them. mac is mad.
  945.         strMenu +="<TABLE></TABLE>";
  946.     }
  947.  
  948.     var layerPopup = null;
  949.     var stylePopup = null;
  950.     var nEventX = 0;
  951.     var nEventY = 0;
  952.     var nWindowWidth = 0;
  953.     if (gbBsIE4) {
  954.  
  955.         layerPopup = document.all["PopupMenu"];
  956.         layerPopup.innerHTML = strMenu;
  957.         stylePopup = layerPopup.style;
  958.  
  959.         _BSPSGetClientSize();
  960.  
  961.         // Get the position of the item causing the event (relative to its parent)
  962.         //if (gbBsMac) {
  963.         if (true) {
  964.             nEventX = window.event.clientX;
  965.             nEventY = window.event.clientY;
  966.         } else {
  967.             //??? YJ: Can not remember why we calculate envent position by following code...
  968.             //but it is wrong in a case like: CENTER->P->TABLE:
  969.             //the offset positions of TABLE, P and CENTER are same (same offsetTop,offsetLeft)
  970.             //so we get triple times of offset of x and y as we expect... 
  971.  
  972.             nEventX = window.event.srcElement.offsetLeft - document.body.scrollLeft;
  973.             nEventY = window.event.srcElement.offsetTop - document.body.scrollTop;
  974.  
  975.             // Get the location of the parent
  976.             var nParentLocX = 0;
  977.             var nParentLocY = 0;
  978.  
  979.             var ParentItem = window.event.srcElement.offsetParent;
  980.             while (ParentItem != null) {
  981.                 if (ParentItem.offsetLeft)    {
  982.                     nParentLocX += ParentItem.offsetLeft;
  983.                     nParentLocY += ParentItem.offsetTop;
  984.                 }
  985.                 ParentItem = ParentItem.parentElement;
  986.             }
  987.  
  988.             // Adjust the location of the item using the location of the parent(s)
  989.             nEventX += nParentLocX;
  990.             nEventY += nParentLocY;
  991.         }
  992.  
  993.         if (nEventY + layerPopup.scrollHeight + 10 < gBsClientHeight) {
  994.             nEventY += document.body.scrollTop + 10;
  995.         } else {
  996.             nEventY = (document.body.scrollTop + gBsClientHeight) - layerPopup.scrollHeight - 20;
  997.         }
  998.         stylePopup.top = nEventY;
  999.  
  1000.         if (nEventX + layerPopup.scrollWidth + 20 > gBsClientWidth) {
  1001.             if (gBsClientWidth - layerPopup.scrollWidth < 5) {
  1002.                 stylePopup.left = 5;
  1003.             } else {
  1004.                 stylePopup.left = gBsClientWidth - layerPopup.scrollWidth - 5;
  1005.             }
  1006.         } else {
  1007.             stylePopup.left = nEventX + document.body.scrollLeft + 20;
  1008.         }
  1009.  
  1010.         stylePopup.visibility = "visible";
  1011.         document.onclick = PopupMenu_HandleClick;
  1012.     } else if (gbBsNS4) {
  1013.         layerPopup = document.layers.PopupMenu;
  1014.         layerPopup.visibility = "hide";
  1015.         stylePopup = layerPopup.document;
  1016.         stylePopup.write(strMenu);
  1017.         stylePopup.close();
  1018.         var e = fn_arguments[0];
  1019.         nEventX = e.pageX;
  1020.         nEventY = e.pageY;
  1021.         _BSPSGetClientSize();
  1022.         if (nEventY + layerPopup.clip.height + 20 < window.pageYOffset + gBsClientHeight) {
  1023.             nEventY += 20;
  1024.         } else {
  1025.             nEventY = gBsClientHeight + window.pageYOffset- layerPopup.clip.height - 20;
  1026.         }
  1027.         layerPopup.top = nEventY;
  1028.  
  1029.         if (nEventX + layerPopup.clip.width + 20 > gBsClientWidth + window.pageXOffset) {
  1030.             if (gBsClientWidth + window.pageXOffset - layerPopup.clip.width < 20) {
  1031.                 nEventX = 5;
  1032.             } else {
  1033.                 nEventX = gBsClientWidth + window.pageXOffset - layerPopup.clip.width - 20;
  1034.             }
  1035.         } else {
  1036.             nEventX += 20;
  1037.         }
  1038.  
  1039.         layerPopup.left = nEventX;
  1040.  
  1041.         layerPopup.visibility = "show";
  1042.  
  1043. //        window.captureEvents(Event.CLICK | Event.MOUSEDOWN);
  1044.         window.captureEvents(Event.MOUSEDOWN);
  1045. //        window.onclick = PopupMenu_HandleClick;
  1046.         window.onmousedown = PopupMenu_HandleClick;
  1047.     }
  1048.  
  1049.     window.gbInPopupMenu = true;
  1050.     window.gbPopupMenuTimeoutExpired = false;
  1051.     setTimeout("PopupMenu_Timeout();", 100);
  1052.     return false;
  1053. }
  1054.  
  1055.  
  1056. function PopupMenu_Timeout()
  1057. {
  1058.     window.gbPopupMenuTimeoutExpired = true;
  1059. }
  1060.  
  1061. function PopupMenu_Over(e)
  1062. {
  1063.     if (gbBsIE4) {
  1064.         e.srcElement.className = "PopupOver";
  1065.     } else if (gbBsNS4) {
  1066. //        this.bgColor = "red";
  1067. //        e.target.document.className = "PopupOver";
  1068.     }
  1069.     return;
  1070. }
  1071.  
  1072. function PopupMenu_Out(e)
  1073. {
  1074.     if (gbBsIE4) {
  1075.         e.srcElement.className = "PopupNotOver";
  1076.     } else if (gbBsNS4) {
  1077.         this.bgColor = "#f0f0f0";
  1078.     }
  1079.     return;
  1080. }
  1081.  
  1082.  
  1083. function PopupMenu_HandleClick(e)
  1084. {
  1085.     if (!window.gbPopupMenuTimeoutExpired) {
  1086.         return;
  1087.     }
  1088.  
  1089.     window.gbInPopupMenu = false;
  1090.  
  1091.     if (gbBsNS4) {
  1092. //        window.releaseEvents(Event.CLICK);
  1093.         window.releaseEvents(Event.MOUSEDOWN);
  1094.     }
  1095.  
  1096.     var layerPopup = null;
  1097.     var stylePopup = null;
  1098.     if (gbBsIE4) {
  1099.         layerPopup = document.all["PopupMenu"];
  1100.         stylePopup = layerPopup.style;
  1101.         stylePopup.visibility = "hidden";
  1102.     } else if (gbBsNS4) {
  1103.         layerPopup = document.layers.PopupMenu;
  1104.         layerPopup.visibility = "hide";
  1105.     }
  1106.  
  1107.     return;
  1108. }
  1109.  
  1110. // This function should be deleted when all old projects are cleaned up
  1111. function BSPSWritePopupFrameForIE4()
  1112. {
  1113.     return false;
  1114. }
  1115.  
  1116. /////////////////////////////////////////////////////////////////////
  1117. function BSSCPopup_ClickMac()
  1118. {
  1119.     if ((!DHTMLPopupSupport()) && (gbBsIE4))
  1120.     {    
  1121.         var bClickOnAnchor = false;
  1122.         var el;
  1123.         if ((window.event != null) &&
  1124.             (window.event.srcElement != null))
  1125.         {
  1126.             el = window.event.srcElement;
  1127.             while (el != null)
  1128.             {
  1129.                 if ((el.tagName == "A") || (el.tagName == "AREA"))     {
  1130.                     bClickOnAnchor = true;
  1131.                     break;
  1132.                 }
  1133.                 if (el.tagName == "BODY") {
  1134.                     break;
  1135.                 }
  1136.                 el = el.parentElement;
  1137.             }
  1138.         }
  1139.         if (BSSCPopup_IsPopup())
  1140.         {
  1141.             if (!bClickOnAnchor) {
  1142.                 parent.window.gPopupWindow = null;
  1143.                 self.close();
  1144.             }
  1145.         }
  1146.         else
  1147.         {
  1148.             bClosePopupWindow = true;
  1149.             if ((bClickOnAnchor) &&
  1150.                 (el.href) &&
  1151.                 (el.href.indexOf("javascript:BSSCPopup") != -1))
  1152.             {
  1153.                 bClosePopupWindow = false;
  1154.             }
  1155.             if (bClosePopupWindow)
  1156.             {
  1157.                 if (window.gPopupWindow != null)
  1158.                 {
  1159.                     var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=300,width=400";
  1160.                     window.gPopupWindow = window.open("", gstrPopupSecondWindowName,strParam);
  1161.                     window.gPopupWindow.close();
  1162.                     window.gPopupWindow = null;
  1163.                 }
  1164.             }
  1165.         }
  1166.     }
  1167.  }
  1168.  
  1169. //////////////////////////////////////////////////////////////////////
  1170.  
  1171. _BSPSGetBrowserInfo();
  1172.  
  1173.  
  1174. function BsPopupOnClick()
  1175. {
  1176.     if (!gbBsIE4)
  1177.         return;
  1178.  
  1179.     BSSCPopup_ClickMac();
  1180. }
  1181.  
  1182. function _BSSCOnError(message)
  1183. {
  1184.     if(-1 != message.indexOf("denied") 
  1185.         || -1 != message.indexOf("Object required"))
  1186.      return true;
  1187. }
  1188.  
  1189. //End to support previous relative topics
  1190.  
  1191. /// Section End  - Popup and Related Topic (JavaScript 1.0)
  1192.  
  1193.